export const searchStudents = (stuNo, name, classChapter, classAssessment) => {
    const allData = [
        {
            "name": "Tom",
            "stuNo": 2000,
            "classChapter": 1,
            "classAssessment": 1,
        },
        {
            "name": "Tom",
            "stuNo": 2000,
            "classChapter":3,
            "classAssessment":2,

        },
        {
            "name": "Tom",
            "stuNo": 2000,
            "classChapter":2,
            "classAssessment":3,

        },
    ]

    return {
        'data': allData.filter(student =>
            (!stuNo || student.stuNo.toString().includes(stuNo)) &&
            (!name || student.name.includes(name)) &&
            (!classChapter || student.classChapter.toString().includes(classChapter)) &&
            (!classAssessment || student.classAssessment.toString().includes(classAssessment))
        )
    }
}